//
//  HBHCompanyPropertyCell.m
//  HubeiHotel
//
//  Created by 张露杰 on 18/4/12.
//  Copyright © 2018年 张露杰. All rights reserved.
//

#import "HBHCompanyPropertyCell.h"

@implementation HBHCompanyPropertyCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])// 先调用父类的方法
    {
        self.selectionStyle = 0;
        self.backgroundColor = [UIColor whiteColor];
    }
    return self;
}

-(void)loadCellWithData:(NSDictionary *)data
{
    for (UIView *view in self.contentView.subviews) {
        [view removeFromSuperview];
    }
    
    UIView *back1 = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREENW, 10*screenW_6)];
    back1.backgroundColor = backColor;
    [self.contentView addSubview:back1];
    
    UIView *back2 = [[UIView alloc]initWithFrame:CGRectMake(0, 110*screenW_6, SCREENW, 10*screenW_6)];
    back2.backgroundColor = backColor;
    [self.contentView addSubview:back2];
    
    UILabel *label1 = [TomamaUI createLabel:CGRectMake(25*screenW_6, 0, SCREENW - 50*screenW_6, 15*screenW_6) textAligment:0 font:[UIFont systemFontOfSize:15*screenW_6] textColor:TextBlack text:data[@""]];
    [self.contentView addSubview:label1];
    label1.center = CGPointMake(label1.center.x, 35*screenW_6);
    
    UILabel *label2 = [TomamaUI createLabel:CGRectMake(25*screenW_6, 0, SCREENW - 50*screenW_6, 15*screenW_6) textAligment:0 font:[UIFont systemFontOfSize:14*screenW_6] textColor:TextBlackGray text:data[@""]];
    [self.contentView addSubview:label2];
    label2.center = CGPointMake(label2.center.x, 85*screenW_6);
    
    UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(25*screenW_6, 60*screenW_6, SCREENW - 25*screenW_6, .5)];
    lineView.backgroundColor= backColor;
    [self.contentView addSubview:lineView];
}

@end
